%ifdef CONFIG
{
  "RegData": {
    "XMM0": ["0x100", "0x100"],
    "XMM1": ["0xC5", "0x88"],
    "XMM2": ["0x66", "0x5A"],
    "XMM3": ["0x6B", "0x68"],
    "XMM4": ["0x60", "0x68"],
    "XMM5": ["0x65", "0x65"],
    "XMM6": ["0x33", "0x57"],
    "XMM7": ["0x38", "0x5C"],
    "XMM8": ["0x3B", "0x6D"]
  },
  "MemoryRegions": {
    "0x100000000": "4096"
  }
}
%endif

mov rdx, 0xe0000000

mov rax, 0x4142434445464748
mov [rdx + 8 * 0], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 1], rax

mov rax, 0x6162636465666768
mov [rdx + 8 * 2], rax
mov rax, 0x7172737475767778
mov [rdx + 8 * 3], rax

movaps xmm0, [rdx + 8 * 2]

psadbw xmm0, [rdx + 8 * 0]

lea rdx, [rel .data]

movaps xmm1, [rdx + 16 * 0]
movaps xmm2, [rdx + 16 * 1]
movaps xmm3, [rdx + 16 * 2]
movaps xmm4, [rdx + 16 * 3]
movaps xmm5, [rdx + 16 * 4]
movaps xmm6, [rdx + 16 * 5]
movaps xmm7, [rdx + 16 * 6]
movaps xmm8, [rdx + 16 * 7]

psadbw xmm1, [rdx + 16 * 8]
psadbw xmm2, [rdx + 16 * 9]
psadbw xmm3, [rdx + 16 * 10]
psadbw xmm4, [rdx + 16 * 11]
psadbw xmm5, [rdx + 16 * 12]
psadbw xmm6, [rdx + 16 * 13]
psadbw xmm7, [rdx + 16 * 14]
psadbw xmm8, [rdx + 16 * 15]

hlt

align 16
; 256bytes of random data
.data:
db '\xe0\xfc\x2b\xa1\x06\x4f\x6c\xa7\x0f\x06\x6a\x1e\x7f\x76\x80\x9b'
db '\xe0\x56\xed\xaa\xf3\xc3\x68\x68\xde\xe6\xe6\x94\xe2\xe9\xfc\xf0'
db '\x6e\x35\xa8\x54\xd7\xab\x8b\x6c\x77\x5f\x92\xca\x25\xa6\x7e\x27'
db '\xc7\xcd\x73\xec\x95\xd6\x6f\x6a\xbb\xae\xf2\xbb\x27\xb9\xa1\xdd'
db '\x73\x4d\xd1\xc7\xd5\x2c\x31\x88\xfe\xe7\xdb\xfd\x1e\x1e\x09\x7f'
db '\x14\xfa\x4e\x95\xef\xe6\x9a\xf2\xa0\x42\x62\x9a\xa4\xa8\x73\x82'
db '\x0e\x0f\x16\x82\x38\x07\x12\x32\x07\x35\x92\xc1\x63\x07\x78\xb3'
db '\xcb\x46\x19\x57\x2b\x37\x2a\x46\x1f\x04\x0e\x79\x3d\xcd\x8d\xa3'
db '\x2b\xf3\x86\x2f\xab\xba\x57\x30\x2e\xd6\x2c\xf0\x46\x4f\x3f\xef'
db '\xef\xd1\xbb\x85\x34\x4b\x3c\xde\x9e\x48\xa3\xb9\x8d\x71\xe3\x9d'
db '\x09\x72\xfb\xde\x8a\x32\x50\x9d\x69\x98\xf1\xf6\x52\xeb\xf7\xee'
db '\xd6\x99\xc2\xff\x30\x1c\x02\xce\x70\x05\xb2\xf1\x56\x9c\x0e\xa6'
db '\x18\x62\xc4\xe2\x86\x38\x76\x30\x2f\xa1\xe4\xa7\x0e\x5d\x53\xeb'
db '\x14\x45\xe0\xb7\xe1\xe8\x02\x68\x1a\xfe\x8e\xc1\x8f\xf2\xeb\x46'
db '\x7f\x5d\x6a\x23\x46\x97\x2e\x03\x98\x12\x32\x8f\x54\x76\x59\xac'
db '\xc8\x76\x5f\xc8\x71\x0c\xd3\xb6\xc5\x19\xea\xab\xa6\x2c\x1d\x88'

